import { ref } from 'vue'
import type { TrajectoryData, TrajectoryChart } from './trajectoryChart'
// 当前视频
interface VideoSource {
  name: string,
  url: string,
  detected_url: string,
  tracked_url: string,
  model_name?: string
}
// 分页展示时存储视频名和视频预览图片url使用
interface VideoDict {
  name: string,
  encode_frame: string,
  save_datetime?: string,
  save_option?: string,
  model_name?: string
}

// 视频列表
const videoList = ref<string[]>([])
// 当前视频
const currentVideo = ref<VideoSource>({
  name: '',
  url: '',
  detected_url: '',
  tracked_url: ''
})

const trackSvg = ref<SVGSVGElement | null>(null)          // 承载轨迹的svg
const trajectoryChart = ref<TrajectoryChart | null>(null) // 轨迹图表对象


export {
  type VideoSource,
  type VideoDict,
  // 变量
  videoList,
  currentVideo,
  trackSvg,
  trajectoryChart,
  // 方法
}
